package com.yhd.decorate;

/**
 * @author yhd
 * @email yinhuidong1@xiaomi.com
 * @description TODO
 * @since 2021/5/21 上午1:08
 */
public class IFutureTask<V> implements IFuture<V>,ICallable{

    private ICallable<V> callable;

    public IFutureTask(ICallable<V> callable) {
        this.callable = callable;
    }

    @Override
    public V get() {
        return this.callable.call();
    }


    @Override
    public V call() {
        return get();
    }
}
